summaryrefslogtreecommitdiff
path: root/app/[lng]/evcp/(evcp)/(system)/menu-access-dept/_components/domain-constants.ts
blob: 2b104d0e452e1fcf0e72c1d4ea60aa68eaa71302 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52


// 통합된 도메인 옵션 - 모든 도메인 정보를 포함
export const DOMAIN_OPTIONS = [
  { 
    value: "pending", 
    label: "pending", 
    description: "승인 대기 상태",
    color: "bg-yellow-100 text-yellow-800 border-yellow-200"
  },
  { 
    value: "evcp", 
    label: "evcp", 
    description: "eVCP 시스템 관리자",
    color: "bg-blue-100 text-blue-800 border-blue-200"
  },
  { 
    value: "procurement", 
    label: "procurement", 
    description: "구매",
    color: "bg-green-100 text-green-800 border-green-200"
  },
  { 
    value: "sales", 
    label: "sales", 
    description: "기술영업",
    color: "bg-purple-100 text-purple-800 border-purple-200"
  },
  { 
    value: "engineering", 
    label: "engineering", 
    description: "설계",
    color: "bg-orange-100 text-orange-800 border-orange-200"
  },
] as const;

// 헬퍼 함수들 - 필요시 매핑 객체 생성
export const getDomainOption = (value: string) => {
  return DOMAIN_OPTIONS.find(option => option.value === value);
};

export const getDomainLabel = (value: string) => {
  return getDomainOption(value)?.label || value;
};

export const getDomainColor = (value: string) => {
  return getDomainOption(value)?.color || "bg-gray-100 text-gray-800 border-gray-200";
};

export const getDomainDescription = (value: string) => {
  return getDomainOption(value)?.description || value;
};